package com.qianya.oa.mapper;

import com.qianya.oa.vo.UploadFileRespVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Date;
import java.util.List;

public interface UploadFileRespMapper {


    List<UploadFileRespVo> selectAllFiles();
    @Select("SELECT * FROM upload_file   WHERE id =#{id}")
    UploadFileRespVo selectOneById(Integer id);
    @Delete("DELETE FROM upload_file WHERE id = #{id}")
    int DeleteFileById(Integer id);
    @Insert("INSERT INTO upload_file (url, original_file_name, file_name, create_time, file_path,upload_user_id)\n" +
            "VALUES (#{url}, #{originalFileName}, #{fileName}, #{createTime}, #{filePath}, #{uploadUserId})")
    int InsertFile(@Param("url") String url,@Param("originalFileName")  String originalFileName,@Param("fileName")  String fileName, @Param("createTime") Date createTime,@Param("filePath") String filePath, @Param("uploadUserId") Integer upUserId);
}
